package com.example.myapplication_2.shop;

import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;


public class Shop_TabFragment extends FragmentPagerAdapter{

    private Fragment [] mFragments;
    private String [] mTitles;

    public Shop_TabFragment (FragmentManager fm, Fragment[] mFragments, String[] mTitles) {
        super(fm);
        this.mFragments = mFragments;
        this.mTitles = mTitles;
    }

    @Override
    public Fragment getItem(int position) {

        return mFragments[position];
    }

    @Override
    public int getCount() {

        return mFragments.length;
    }

    @Override
    public CharSequence getPageTitle(int position) {

        return mTitles[position];
    }
}